package com.neuedu.api.collection;

/**
 * @author 金山
 * 项目：javase
 * site: https://blog.fulfill.com.cn
 * 描述
 * @data 2024/10/2816:23
 */
public class MyCollection2<E extends  Number> {


    private Object[] objects = new Object[16];
    private int size = 0;



    public boolean add(E obj){
        objects[size++] = obj;

        return true;
    }
    // Wildcards
    // public void add(? t) {
    //
    // }





    public static void main(String[] args) {
        MyCollection2<Integer> collection = new MyCollection2();
        collection.add(100);
        collection.add(200);


        MyCollection2<Double> collection2 = new MyCollection2();
        collection2.add(3.14);
        collection2.add(5.89);


    }

}
